package com.plumdong;

import com.plumdong.news.service.NewsService;
import com.plumdong.sms.service.SmsService;
import io.grpc.Server;
import io.grpc.ServerBuilder;

import java.io.IOException;

public class GrpcServer {
    private static final int port = 9999;

    public static void main(String[] args) throws IOException, InterruptedException {
        Server server = ServerBuilder.forPort(port)
                .addService(new NewsService())
                .addService(new SmsService())
                .build().start();
        System.out.println("服务启动成功！端口号：" + port);
        server.awaitTermination();

    }

}
